﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
 

namespace nadModel.ApproverTimeAndExpense
{
    public partial class TimeAndExpenseCoPartEntityProcess : AbstractEntityProcess
    {
        public string conection_addr = "http://nad.nadfinlo.com.cn/nad/";

        public TimeAndExpenseCoPartEntity[] FindDataBySysrowid(string sysrowid)
        {
            List<TimeAndExpenseCoPartEntity> list = new List<TimeAndExpenseCoPartEntity>();
            string sql = "select * from " + TimeAndExpenseCoPartEntity.DB_TABLES + " where " + TimeAndExpenseCoPartEntity.STATUS + "=0 and " + TimeAndExpenseCoPartEntity.SYSROWID + "='" + sysrowid + "' ";
            TimeAndExpenseCoPartEntity[] ens = (TimeAndExpenseCoPartEntity[])FindBySql(sql, conection_addr);

            return ens;
        }

        public void UpdateStatus(TimeAndExpenseCoPartEntity ent)
        {
            string sql = "update " + TimeAndExpenseCoPartEntity.DB_TABLES + " set status=1 where  " + TimeAndExpenseCoPartEntity.DTLSYSROWID + "='" + ent.DtlSysRowId + "' ";

            ExecuteNonQuery(sql, conection_addr);
        }
    }
}
